home *** CD-ROM | disk | FTP | other *** search
/ Mac-Source 1994 July / Mac-Source_July_1994.iso / Other Langs / Tickle-4.0 (tcl) / library / help / tcl / lists / lsearch < prev    next >
Encoding:
Text File  |  1993-10-26  |  1.1 KB  |  32 lines  |  [TEXT/$Tcl]

  1.  
  2.           lsearch ?mode? list pattern
  3.  
  4.  
  5.      DESCRIPTION
  6.           This command searches the elements of list to see if one  of
  7.           them  matches pattern.  If so, the command returns the index
  8.           of the first matching element.  If not, the command  returns
  9.           -1.   The  mode  argument  indicates how the elements of the
  10.           list are to be matched against pattern and it must have  one
  11.           of the following values:
  12.  
  13.           -exact
  14.                The list element must contain exactly the  same  string
  15.                as pattern.
  16.  
  17.           -glob
  18.                Pattern  is  a  glob-style  pattern  which  is  matched
  19.                against  each  list element using the same rules as the
  20.                string match command.
  21.  
  22.           -regexp
  23.                Pattern is treated as a regular expression and  matched
  24.                against  each  list element using the same rules as the
  25.                regexp command.
  26.  
  27.           If mode is omitted then it defaults to -glob.
  28.  
  29.  
  30.      KEYWORDS
  31.           list, match, pattern, regular expression, search, string
  32.